#ifndef MPROCESS_H
#define MPROCESS_H

#include <QProcess>
#include <QDebug>

class mprocess : public QProcess
{
    Q_OBJECT
public:
    explicit mprocess(QObject *parent = 0);

    void addArgument(const QString & a); 	//!< Add an argument

    void clearArguments();                      //!< Clear the list of arguments
    QStringList arguments();                    //!< Return the list of arguments

    void start();				//!< Start the process
    bool isRunning();                           //!< Return true if the process is running

    void writeToStdin(QString text);

signals:
    void mplayerTimePos(const float seconds);
    void mediaPlayEnd();

public slots:
    void readFromClient();

private:
    QString     program;
    QStringList arg;
};

#endif // MPROCESS_H
